package org.lgiavedoni.android.franq.util.phone;

import org.lgiavedoni.android.franq.service.phone.ContextService;

import android.content.Intent;

public class ActivityUtil {

	public static void startActivity(Class clazz) {
		/**
		 * NOTE the activity has to be defined in the AndroidManifest.xml f.e:
		 * <activity android:name=".VoiceRecognition" />
		 */
		if (ContextService.inst.isApplicationContextLoaded()) {
			Intent i = new Intent(ContextService.inst.getApplicationContext(), clazz);
			i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
			ContextService.inst.getApplicationContext().startActivity(i);
		}
	}

}
